{template 'web/_header'}
{template 'web/sysset/tabs'}
<div class="main">
    <form action="" method="post" class="form-horizontal form" enctype="multipart/form-data" >
        <input type='hidden' name='setid' value="{$set['id']}" />
        <input type='hidden' name='op' value="trade" />
        <div class="panel panel-default">
            <div class='panel-body'>

                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">自动收货天数</label>
                    <div class="col-sm-5">
                        {ifp 'sysset.save.trade'}
                        <div class="input-group">
                            <input type="text" name="trade[receive]" class="form-control" value="{$set['trade']['receive']}" />
                            <div class="input-group-addon">天</div>
                        </div>
                        <span class='help-block'>订单发货后，用户收货的天数，如果在期间未确认收货，系统自动完成收货，默认为9天</span>
                        {else}
                        <input type="hidden" name="trade[receive]" value="{$set['trade']['receive']}"/>
                        <div class='form-control-static'>
                            {if empty($set['trade']['receive'])}9{else}{$set['trade']['receive']}{/if} 天
                        </div>
                        {/if}
                    </div>
                </div>
                
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">完成订单多少天内可申请退款</label>
                    <div class="col-sm-5">
                        {ifp 'sysset.save.trade'}
                        <div class="input-group">
                            <input type="text" name="trade[refunddays]" class="form-control" value="{$set['trade']['refunddays']}" />
                            <div class="input-group-addon">天</div>
                        </div>
                        <span class='help-block'>订单完成后 ，用户在x天内可以发起退款申请，默认为7天</span>
                        {else}
                        <input type="hidden" name="trade[refunddays]" value="{$set['trade']['refunddays']}"/>
                        <div class='form-control-static'>
                            {if empty($set['trade']['refunddays'])}7{else}{$set['trade']['refunddays']}{/if} 天
                        </div>
                        {/if}
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">退款说明</label>
                    <div class="col-sm-5">
                        {ifp 'sysset.save.trade'}
                        <textarea  name="trade[refundcontent]" class="form-control" value="{$set['trade']['refundcontent']}" >{$set['trade']['refundcontent']}</textarea>
                        <span class='help-block'>用户在申请退款页面的说明</span>
                        {else}
                        <input type="hidden" name="trade[refundcontent]" value="{$set['trade']['refundcontent']}"/>
                        <div class='form-control-static'>
                           {$set['trade']['refundcontent']}
                        </div>
                        {/if}
                    </div>
                </div>
                
                
                
                {if $_W['isfounder']}
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">自动收货执行间隔时间</label>
                    <div class="col-sm-5">
                        {ifp 'sysset.save.trade'}
                        <div class="input-group">
                            <input type="text" name="trade[receivetime]" class="form-control" value="{$set['trade']['receivetime']}" />
                            <div class="input-group-addon">分钟</div>
                        </div>
                        <span class='help-block'>执行自动收货操作的间隔时间，如果为空默认为 60分钟 执行一次自动收货</span>
                        {else}
                        <input type="hidden" name="trade[receivetime]" value="{$set['trade']['receivetime']}"/>
                        <div class='form-control-static'>
                            {if empty($set['trade']['receivetime'])}60{else}{$set['trade']['receivetime']}{/if} 分钟
                        </div>
                        {/if}
                    </div>
                </div>
                {/if}

                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">开启余额提现</label>
                    <div class="col-sm-9 col-xs-12">
                        {ifp 'sysset.save.trade'}
                        <label class='radio-inline'><input type='radio' name='trade[withdraw]' value='1' {if $set['trade']['withdraw']==1}checked{/if}/> 开启</label>
                        <label class='radio-inline'><input type='radio' name='trade[withdraw]' value='0' {if $set['trade']['withdraw']==0}checked{/if} /> 关闭</label>
                        <span class='help-block'>是否允许用户将余额提出</span>
                        {else}
                        <input type="hidden" name="trade[withdraw]" value="{$set['trade']['withdraw']}"/>
                        <div class='form-control-static'>{if $set['trade']['withdraw']==1}开启{else}关闭{/if}</div>
                        {/if}
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">余额提现限制</label>
                    <div class="col-sm-9 col-xs-12">
                        {ifp 'sysset.save.trade'}
                        <input type="text" name="trade[withdrawmoney]" class="form-control" value="{$set['trade']['withdrawmoney']}" />
                        <span class='help-block'>余额满多少才能提现,空或0不限制</span>
                        {else}
                        <input type="hidden" name="trade[withdrawmoney]" value="{$set['trade']['withdrawmoney']}"/>
                        <div class='form-control-static'>
                            {if empty($set['trade']['withdrawmoney'])}不限制{else}{$set['trade']['withdrawmoney']} 元 {/if}
                        </div>
                        {/if}
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">充值积分比例</label>
                    <div class="col-sm-9 col-xs-12">
                        {ifp 'sysset.save.trade'}
                        <div class='input-group'>
                            <input type="text" name="trade[money]" class="form-control" value="{$set['trade']['money']}" />
                            <span class='input-group-addon'>元 增加</span>
                            <input type="text" name="trade[credit]" class="form-control" value="{$set['trade']['credit']}" />
                            <span class='input-group-addon'>分</span>
                        </div>
                        <span class='help-block'>用户充值获得的积分</span>
                        {else}
                        <input type="hidden" name="trade[money]" value="{$set['trade']['money']}"/>
                        <input type="hidden" name="trade[credit]" value="{$set['trade']['credit']}"/>
                        <div class='form-control-static'>
                            {if empty($set['trade']['money'])}
                            充值无积分
                            {else}
                            {$set['trade']['money']} 元增加 {$set['trade']['credit']} 积分
                            {/if}
                        </div>
                        {/if}
                    </div>
                </div>
                
                
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">获取微信共享收货地址</label>
                    <div class="col-sm-9 col-xs-12">
                        {ifp 'sysset.save.trade'}
                        <label class='radio-inline'><input type='radio' name='trade[shareaddress]' value='0' {if $set['trade']['shareaddress']==0}checked{/if} /> 关闭</label>
                        <label class='radio-inline'><input type='radio' name='trade[shareaddress]' value='1' {if $set['trade']['shareaddress']==1}checked{/if}/> 开启</label>
                        <span class='help-block'>是否在用户添加收货地址时候获取用户的微信收货地址</span>
                        {else}
                        <input type="hidden" name="trade[shareaddress]" value="{$set['trade']['shareaddress']}"/>
                        <div class='form-control-static'>{if $set['trade']['shareaddress']==1}开启{else}关闭{/if}</div>
                        {/if}
                    </div>
                </div>
                
                
                       <div class="form-group"></div>
            <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
                    <div class="col-sm-9 col-xs-12">
                           {ifp 'sysset.save.trade'}
                            <input type="submit" name="submit" value="提交" class="btn btn-primary col-lg-1"  />
                            <input type="hidden" name="token" value="{$_W['token']}" />
                          {/if}
                     </div>
            </div>



            </div>
        </div>     
    </form>
</div>
{template 'web/_footer'}     